#include "Generate_C_std.h"
#include "Pattern_eval_expr_or_assign_var.h"

/* A number of patterns can be n the form of either Eval_expr
 * (Method_invocation) or Assign_var (_, _, Method_invocation). Abstract this
 * to avoid duplication. */
bool Pattern_eval_expr_or_assign_var::match(Statement* that)
{
  bool result = that->match (new Eval_expr (rhs_pattern()));
  if (result)
    {
      lhs = NULL;
      return true;
    }
  else
    return Pattern_assign_var::match(that);
}


//CREATE(Pattern_eval_expr_or_assign_var);
//virtual void Pattern::generate_code(Generate_C*)
//virtual MIR::Expr* Pattern_assign_var::rhs_pattern()

